package zero.mybatisplus.dynamictable.threadlocal;

import zero.mybatisplus.dynamictable.param.DynamicTableParam;

/**
 * 动态表线程对象
 */
public class ThreadLocalDynamicTable {
    public static ThreadLocal<DynamicTableParam> dynamicTableParam = new ThreadLocal<>();

    public static DynamicTableParam getDynamicTableParam() {
        return dynamicTableParam.get();
    }

    public static void setDynamicTableParam(DynamicTableParam dynamicTableParam) {
        ThreadLocalDynamicTable.dynamicTableParam.set(dynamicTableParam);
    }

    public static void remove() {
        dynamicTableParam.remove();
    }
}
